<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Danh sách lớp</a></li>
		<li class="tabs-lop-frm"><a href="#tabs-2"><?php echo $this->titleForm; ?></a></li>
		<li><a href="#tabs-3">Xuất nhập file</a></li>
	</ul>
	
	<div id="tabs-1">
	    <form action="" method="get" class="frm-data">
	        <p class="search_box">
	            <input class="sbt hover focus" type="text" name="search_box_text"/>
	            <input class="sbc input-hover" type="submit" name="search_box_sumit" value="Tìm lớp"/>
	        </p><!-- End .search_box-->
	         <p class="saporator sf"><br /></p>
	         
	        <div class="table_nav">
	                <div class="table_nav_left">
	                         
	                    <select id="tbn_cat" name="tbn_cate">
	                        <option value="0" selected="selected">Hiển thị tất cả</option>
	                    <?php 
	                    	foreach ($this->khoaHoc as $khoa) {
	                    		echo '<option value ="'.$khoa['khoa'].'">Khóa '.$khoa['khoa'].'</option>';
	                    	}
	                    ?>                 
	                                               
	                    </select>
	                    <input type="submit" value="Lọc" name="tbn_filter" class="tbn_button input-hover"/> <!-- tbn: là viết tắt của từ table_nav trong div class="table_nav" -->
	                    <input type="submit" value="Xóa" name="del" class="tbn_button input-hover"/>
	                </div><!-- end .table_nav_left -->
	                <div class="table_nav_pages">  
	                <?php 
	                	//phan trang
						echo $this->paginationControl($this->paginator,'sliding','paginator.phtml');
					?>                           
	                </div>
	            </div><!-- End .table_nav-->
	        <table id="p_post">
	            <thead>
	                <tr>
	                    <th class="col-1-lop"><input class="check-all" type="checkbox" /></th>
	                    <th class="col-2-lop">Mã lớp</th>
	                    <th class="col-3-lop">Lớp</th>
	                    <th class="col-4-lop">Khóa</th>
	                    <th class="col-5-lop">Danh sách sinh viên của lớp</th>                    
	                </tr>
	            </thead>
	            <tbody>
	            <?php 
	            	foreach ($this->paginator as $lop){
	            ?>   
	            
	                <tr>
	                    <th class="col-1-lop">
	                        <input class="sub-check" name="lop-check[]" type="checkbox" value="<?php echo $lop['id'];?>"/>
	                    </th>
	                    <th class="col-2-lop"><?php echo $lop['id'];?></th>
	                    <th class="col-3-lop post_title">
	                        <strong><a href="" class="title_ct"><?php echo $lop['tenLop'];?></a></strong> 
	                    <div class="row_action">
	                        <span class="row_edit">
	                        	<a href="<?php echo $this->baseUrl('/admin/lop/?edit&id='.$lop['id']);?>">Sửa</a>|
	                        </span>
	                        <span class="row_del">
	                        	<a href="<?php echo $this->baseUrl('/admin/lop/delete/?delete&id='.$lop['id']);?>">Xóa</a>
	                        </span>                        
	                    </div>
	                    </th>
	                    
	                    <th class="col-4-lop"><?php echo $lop['khoa']?></th>
	                    <th class="col-5-lop"><a href="<?php echo $this->baseUrl('/admin/student/?lop='.$lop['id']);?>">Xem</a></th>
	                </tr>                                          
	            <?php 
	            	}
	            ?>             
	            </tbody>
	            <tfoot>
	                <tr>
	                    <th class="col-1-lop"><input class="check-all" type="checkbox" /></th>
	                    <th class="col-2-lop">Mã lớp</th>
	                    <th class="col-3-lop">Lớp</th>
	                    <th class="col-4-lop">Khóa</th>
	                    <th class="col-5-lop">Danh sách sinh viên của lớp</th>                    
	                </tr>
	            </tfoot>
	        </table>
	                
	    </form>
	</div>
	
	<div id="tabs-2">
		<div class="lopForm">
		<?php
			echo $this->lopForm;
		?>
		</div>
	</div>
	
	<div id="tabs-3">
		<div class="tabbed_area">
            <ul class="tabs">
                <li><a href="#" title='import-lop' class="active tab">Nhập bằng file</a></li>
                <li><a href="#" title='export-lop' class="tab">Xuất ra file</a></li>
            </ul>
	        <div id="import-lop" class="content">
	            <form action="<?php echo $this->baseUrl('/admin/lop/import/')?>" method="post" enctype="multipart/form-data">
	    			<input type="file" name="fLImport" /><br />
	    			<input type="submit" name="cmdLImport" value="Nhập" class="input-hover"/>
	    		</form>  
	        </div>
	        
	        <div id="export-lop" class="content">
	            <form action="<?php echo $this->baseUrl('/admin/lop/export/')?>" method="post" enctype="multipart/form-data">
	    			<input type="submit" name="cmdLExport" value="Xuất" class="input-hover " />
	    		</form>
	        </div>

        </div><!--end .tabbed_area-->
	</div>
</div> <!-- End #tabs -->

<script type="text/javascript">
    $(document).ready(function(){
        $.extend({
            getUrlVars: function(){
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for(var i = 0; i < hashes.length; i++){
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            },
            getUrlVar: function(name){
                return $.getUrlVars()[name];
            }
        });
        
        paramSelect = $.getUrlVar('id');
        //alert(paramSelect);
        if(paramSelect !=null){
            $('#tabs-1').addClass('ui-tabs-hide');
            $('.ui-state-active').removeClass('ui-tabs-selected ui-state-active');
            
            $('.tabs-lop-frm').addClass('ui-tabs-selected ui-state-active');            
            $('#tabs-2').removeClass('ui-tabs-hide');
            
        }
       
    });
</script>